#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "UIfile.h"
#include "editor.h"
#include <algorithm>
#include "filesystem.h"
#include <table.h>

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(FileSystem *file_system, QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void on_back_clicked();

    void on_open_clicked();

    void on_del_clicked();

    void on_newFile_clicked();

    void on_search_clicked();

    void on_small_clicked();

    void on_mid_clicked();

    void on_big_clicked();

    void on_showDisk_clicked();

public:
    int RowNum = 3;
    int size = 1;
    FileSystem *file_system_;

    void Choosefile(UIfile *);
    UIfile* Getfile();
    void setFileNULL();
    void setPath(QString );
    QString getPath();
    void setList();
    void setPresent(double);
    void updateFileArea();
    void muenDelete();

private:
    UIfile* CFile=NULL;
    double present;
    QList<UIfile*> fileList;
    QString path;
    Ui::MainWindow *ui;
    editor e;
    table t;

};
#endif // MAINWINDOW_H
